package com.mcxx.modules.statistics.dto;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.List;


@Data
@EqualsAndHashCode(callSuper = true)
public class PovertyApprovalDTO extends StatisticDTO implements Serializable {
    private static final long serialVersionUID = 7390186971742288314L;

    private Long allfocusNursingNum;
    private Long halffocusNursingNum;
    private Long allfocusSelfcareNum;
    private Long allNursingNum;
    private Long halfNursingNum;
    private Long allSelfcareNum;
    private Long isNum;
    private Long docNum;
    private Double basiclifefund;
    private Double allNursing;
    private Double halfNursing;
    private Double allSelfcare;
    private Double basic;
    private Double care;
    private Double zidingyi;
    private String isHe;

    public static void sumForField(List<PovertyApprovalDTO> list, PovertyApprovalDTO dto) {

        Long vag1 = list.stream().mapToLong(PovertyApprovalDTO::getAllfocusNursingNum).sum();
        dto.setAllfocusNursingNum(vag1);
        Long vag2 = list.stream().mapToLong(PovertyApprovalDTO::getHalffocusNursingNum).sum();
        dto.setHalffocusNursingNum(vag2);
        Long vag3 = list.stream().mapToLong(PovertyApprovalDTO::getAllfocusSelfcareNum).sum();
        dto.setAllfocusSelfcareNum(vag3);
        Long vag4 = list.stream().mapToLong(PovertyApprovalDTO::getAllNursingNum).sum();
        dto.setAllNursingNum(vag4);
        Long vag5 = list.stream().mapToLong(PovertyApprovalDTO::getHalfNursingNum).sum();
        dto.setHalfNursingNum(vag5);
        Long vag6 = list.stream().mapToLong(PovertyApprovalDTO::getAllSelfcareNum).sum();
        dto.setAllSelfcareNum(vag6);
        Long vag7 = list.stream().mapToLong(PovertyApprovalDTO::getIsNum).sum();
        dto.setIsNum(vag7);
        Long vag8 = list.stream().mapToLong(PovertyApprovalDTO::getDocNum).sum();
        dto.setDocNum(vag8);
        Double vag9 = list.stream().mapToDouble(PovertyApprovalDTO::getBasiclifefund).sum();
        dto.setBasiclifefund(vag9);
        Double vag10 = list.stream().mapToDouble(PovertyApprovalDTO::getAllNursing).sum();
        dto.setAllNursing(vag10);
        Double vag11 = list.stream().mapToDouble(PovertyApprovalDTO::getHalfNursing).sum();
        dto.setHalfNursing(vag11);
        Double vag12 = list.stream().mapToDouble(PovertyApprovalDTO::getAllSelfcare).sum();
        dto.setAllSelfcare(vag12);
        Double vag13 = list.stream().mapToDouble(PovertyApprovalDTO::getBasic).sum();
        dto.setBasic(vag13);
        Double vag14 = list.stream().mapToDouble(PovertyApprovalDTO::getCare).sum();
        dto.setCare(vag14);
        Double vag15 = list.stream().mapToDouble(PovertyApprovalDTO::getZidingyi).sum();
        dto.setZidingyi(vag15);
    }
}
